FROM node:12

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

# Bundle app source
COPY . .
EXPOSE 7000

CMD [ "node", "index.js" ]

#sudo docker build -t='yutianchi/chat-app-nodejs-server:1.0.0' .
#sudo docker run --net=host --name  chat-app-nodejs-server -p 7000:7000 -it -d yutianchi/chat-app-nodejs-server:1.0.0